/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UIManager;
import weka.gui.GenericObjectEditor;
import weka.gui.PropertyPanel;

/**
 *
 * @author kevin
 */
public class EcocPanel extends JPanel {

    /** Lets the user configure the classifier */
    protected GenericObjectEditor m_ClassifierEditor =
            new GenericObjectEditor();
    /** The panel showing the current classifier selection */
    protected PropertyPanel m_CEPanel = new PropertyPanel(m_ClassifierEditor);

    public EcocPanel() {
        // Layout the GUI
        JPanel p1 = new JPanel();
        p1.setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createTitledBorder("Classifier"),
                BorderFactory.createEmptyBorder(0, 5, 5, 5)));
        p1.setLayout(new BorderLayout());
        p1.add(m_CEPanel, BorderLayout.NORTH);
        this.add(p1);
    }

    public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            final JFrame jf = new JFrame("multiclass");
            EcocPanel panel = new EcocPanel();
            jf.getContentPane().setLayout(new BorderLayout());
            jf.getContentPane().add(panel, BorderLayout.CENTER);

            //jf.getContentPane()
            jf.addWindowListener(new WindowAdapter() {

                @Override
                public void windowClosing(WindowEvent e) {
                    jf.dispose();
                    System.exit(0);
                }
            });
            jf.pack();
            jf.setSize(1000, 700);
            jf.setVisible(true);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
